package com.foolishbird.sdk.params;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

import com.foolishbird.sdk.params.bean.State;
import com.foolishbird.sdk.utils.WL;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;


public class ResponseParams<T extends Serializable> implements Serializable {



    private static final String TAG = ResponseParams.class.getSimpleName();

    @SerializedName("state")
    private State state;

    @SerializedName("data")
    private T data;

    public ResponseParams() {
    }



    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


    public boolean isSuccess(){
        return state == null ? false : state.getCode() == State.SUCCESS;
    }

}
